package com.xjrsoft.module.interfaceManager.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xjrsoft.common.result.Response;
import com.xjrsoft.module.interfaceManager.dto.AddInfoDto;
import com.xjrsoft.module.interfaceManager.entity.XjrInterfaceInfo;
import com.xjrsoft.module.interfaceManager.entity.XjrInterfaceOutput;
import com.xjrsoft.module.interfaceManager.entity.XjrInterfaceParams;

import javax.servlet.http.HttpServletRequest;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 接口信息管理（框架内部接口） 服务类
 * </p>
 *
 * @author tzx
 * @since 2022-01-18
 */
public interface IXjrInterfaceInfoService extends IService<XjrInterfaceInfo> {

    Response execute(String id, Map<String, String> paramMap, HttpServletRequest request) throws SQLException;

    Response executeGet(XjrInterfaceInfo info, List<XjrInterfaceParams> paramsList, List<XjrInterfaceOutput> outputList, Map<String,String> paramMap, HttpServletRequest request);

    Response executePost(XjrInterfaceInfo info,List<XjrInterfaceParams> paramsList,List<XjrInterfaceOutput> outputList, Map<String,String> paramMap, HttpServletRequest request);

    Response executePut(XjrInterfaceInfo info,List<XjrInterfaceParams> paramsList,List<XjrInterfaceOutput> outputList, Map<String,String> paramMap, HttpServletRequest request);

    Response executeDelete(XjrInterfaceInfo info,List<XjrInterfaceParams> paramsList,List<XjrInterfaceOutput> outputList, Map<String,String> paramMap, HttpServletRequest request);

    Boolean add(AddInfoDto dto);

    boolean saveBatch(List<AddInfoDto> infoDtoList);
}
